package com.sq.universe.system;

import com.sq.universe.system.listener.WebSocketServer;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.oas.annotations.EnableOpenApi;

import static org.springframework.web.cors.CorsConfiguration.ALL;

@SpringBootApplication(scanBasePackages = "com.sq.universe")
@MapperScan("com.sq.universe.*.dao")
@EnableTransactionManagement
@EnableCaching
@EnableDiscoveryClient
@EnableFeignClients(basePackages  = "com.sq.universe")
@EnableOpenApi
@Slf4j
public class SystemApplication implements WebMvcConfigurer {


	public static void main(String[] args) {
		log.error("123412312312");
		SpringApplication.run(SystemApplication.class, args);
		log.error("123412312312");
	}

}
